package com.sky.cqculture.pojo;

import java.util.Date;

public class Product {
    private Integer id;         // 商品ID
    private String name;        // 商品名称
    private Double price;       // 价格
    private Integer sales;      // 销量
    private String imageUrl;    // 图片URL
    private Boolean isNew;      // 是否新品
    private Double rating;      // 评分
    private Integer reviews;    // 评论数
    private Integer categoryId; // 分类ID
    private Date createTime;    // 创建时间
    private Date updateTime;    // 更新时间
    
    // 扩展字段，用于前端展示
    private String categoryName; // 分类名称
    
    // 构造方法、getter和setter
    public Product() {}
    
    public Product(Integer id, String name, Double price, Integer sales, String imageUrl, 
                  Boolean isNew, Integer categoryId) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.sales = sales;
        this.imageUrl = imageUrl;
        this.isNew = isNew;
        this.categoryId = categoryId;
    }
    
    // getter和setter方法
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    
    public String getName() { return name; }
    public void setName(String name) { this.name = name; }
    
    public Double getPrice() { return price; }
    public void setPrice(Double price) { this.price = price; }
    
    public Integer getSales() { return sales; }
    public void setSales(Integer sales) { this.sales = sales; }
    
    public String getImageUrl() { return imageUrl; }
    public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; }
    
    public Boolean getIsNew() { return isNew; }
    public void setIsNew(Boolean isNew) { this.isNew = isNew; }
    
    public Double getRating() { return rating; }
    public void setRating(Double rating) { this.rating = rating; }
    
    public Integer getReviews() { return reviews; }
    public void setReviews(Integer reviews) { this.reviews = reviews; }
    
    public Integer getCategoryId() { return categoryId; }
    public void setCategoryId(Integer categoryId) { this.categoryId = categoryId; }
    
    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }
    
    public Date getUpdateTime() { return updateTime; }
    public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
    
    public String getCategoryName() { return categoryName; }
    public void setCategoryName(String categoryName) { this.categoryName = categoryName; }
}